package com.ws.impl;

import java.util.List;
import java.util.Map;

import javax.jws.WebService;

import com.ws.IHelloWorld;
import com.ws.bean.Cat;
import com.ws.bean.User;
import com.ws.service.UserServiceImpl;

@WebService(endpointInterface = "com.ws.IHelloWorld")
public class HelloWorldWs implements IHelloWorld {
	@Override
	public String sayHi(String name) {
		String msg = "Hi " + name;
		System.out.println(msg);
		return msg;
	}

	@Override
	public List<Cat> getCatsByUser(User user) {
		UserServiceImpl service = new UserServiceImpl();
		return service.getCatsByUser(user);
	}

	@Override
	public Map<String, Cat> getAllCats() {
		UserServiceImpl service = new UserServiceImpl();
		return service.getAllCats();
	}

}
